package com.yixing.tech.common;

import org.bson.Document;
import org.bson.types.ObjectId;

/**
 * @author yixing tech
 * @since 1.0.0
 */
public interface DictDoc {

    String getCode();

    default Document wrapDictItemDoc() {
        Document doc = new Document();
        doc.put("id", new ObjectId(getCode()));
        return doc;
    }

}
